package com.zxm.ssm.service;

import com.github.pagehelper.PageInfo;
import com.zxm.ssm.entity.RegisterUser;
import com.zxm.ssm.entity.User;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Transactional
public interface UserService {

    @Transactional(readOnly = true)
    User findUserByNameAndPwd(User user);

    Integer addUser(RegisterUser user);

    @Transactional(readOnly = true)
    PageInfo<User> findAllUsers(int pageNum, int pageSize);

    Integer saveUser(User user);

    @Transactional(readOnly = true)
    User findUserById(int id);

    Integer UpdateUser(User user);

    void delUserById(int id);
}
